package com.easy.base.api.model.exception;

import com.easy.base.api.model.dto.ResultBody;

import org.springframework.http.HttpStatus;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class BizException extends RuntimeException {

    public BizException(HttpStatus status, boolean success, String errorMessage, int showType) {
        this.status = status;
        this.body = ResultBody.Error(success, String.valueOf(status.value()), errorMessage, showType);
    }

    private HttpStatus status;
    private ResultBody<Object> body;
}
